﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using StateGrid;
using StateGrid.User;
using StateGrid.GlobalVariables;

public partial class Error : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            if (!UserManageDAO.IsLogin((User)Session["login"]))
            {
                Response.Write(" <script> top.location = '" + GlobalResource.LOGIN_PAGE + "' </script> ");
                return;
            }
            else
            {
                String message = (String)Request["message"];
                //String message = HttpUtility.UrlDecode("message");
                this.errorTextBox.Text = HttpUtility.UrlDecode(message);
            }
        }
    }
}